const mongoose = require('../../../dao/mongo/mongo');
const Schema = mongoose.Schema;

//当前宝箱记录
const boxSchema = new Schema({
  id:{    //宝箱ID
    type:String 
  },
  uid: {    //用户ID
    type: String,
    required: true
  },
  chest_type: {   // 0:已拥有宝箱 1:待收取宝箱
    type: Number,
    enum: [0, 1],
    default: 0
  },
  created_at:{    //创建时间
    type:Date,
    default:(new Date()).valueOf()
  }
});

module.exports = mongoose.model('box', boxSchema);
